Package edu.uky.ai.csp
Contains classes for representing and solving simple constraint satisfaction problems.
It is recommended that you complete this exercise in this order:
- Begin by reading the documentation for
ProblemandSolutionand consideringSolver#solve, which has already been written for you. - Run
Mainon each of the example problems to see how this naive search algorithm performs. - Start by filling in
propagate, and the three helper methods needed to make it work. - Run the example problems again to see how using constraint propagation can be helpful as a pre-processing step. Note that some problems, such as the easy Sudoku, can be solved completely by constraint propagation.
- Now work on improving the helper methods used by
solveand see how each one improves the performance of the algorithm.
-
Class Summary Class Description Main Solves a given constraint satisfaction problem and prints out information about how much work was done to reach the solution.MapColoring Models the problem of coloring a map so that no two adjacent regions have the same color.Problems A set of example constraint satisfaction problems to solve.Solver Provides the constraint propagation and search algorithms used to solve constraint satisfaction problems.Sudoku Models a Sudoku puzzle as a constraint satisfaction problem.